for x in range(17):
    a = 17 ** 7 + 2 * 17 ** 6 + 3 * 17 ** 5 + 4 * 17 ** 4 + 6 * 17 ** 3 + x * 17 ** 2 + 17 + 7
    b = 7 * 17 ** 4 + x * 17 ** 3 + 17 ** 2 + 7 * 17 + 1
    if (a + b) % 16 == 0:
        print((a + b) // 16, x)
